#include <stdlib.h>
#include "iostream.h"
#include "iomanip.h"
#include "string.h"

int main()
{
  cout << "Type in some strings" << endl;
  for(int i = 0; i < 16; ++i)
  {
    string s;
    cout << ">> ";
    if(cin >> s)
      cout << "<< |" << s << "|" << endl;
    else
    {
      cout << "cin failed" << endl;
      break;
    }
  }

  cout << "Type in some lines" << endl;
  for(int j = 0; j < 16; ++j)
  {
    string s;
    cout << ">> ";
    if(getline(cin, s))
      cout << "<< |" << s << "|" << endl;
    else
    {
      cout << "cin failed" << endl;
      break;
    }
  }
}
